<!DOCTYPE html>
<!-- saved from url=(0024)http://dh.mkjrda.top/#16 -->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>运营导航 - 为两亿粉丝提供有价值的服务</title>
    <meta name="description" content="">
    <link rel="stylesheet" href="{{URL::asset('css/fontello.css')}}">
    <link rel="stylesheet" href="{{URL::asset('css/styles.css')}}">
    <link href="{{URL::asset('css/font-awesome.min.css')}}" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<style>
    .container{
        width: 80%;
    }
    .user_info a:hover{
        color: #ff521a;
        text-decoration: none;
    }

</style>
<script>
    $(function () {
        var user = JSON.parse(sessionStorage.getItem("users"));
        if(user){
            $('#login').css('display','none');
            $('.dropdown').css('display','block');
            $('#user_info_name').html(user.username);
        }
    });
    
    function loginOut() {
        sessionStorage.removeItem("users");

        swal("注销成功！").then( (value)=>{
            window.location.href = '/login';
        });

    }
</script>
<body class="body-home body-website">
<div class="header ">
    <div class="container">
        <div style="margin-top: 5px;" class="pull-right user_info">
            <div id="login" style="display: block">
                <a href="/login">
                    <div style="border-radius: 5px;background: #fff;padding: 5px 30px;font-size: 16px;">
                        登录
                    </div>
                </a>
            </div>

            <div class="dropdown" style="font-size: 16px;display: none;">
                <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                    <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                    <span id="user_info_name">admin</span>
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" aria-labelledby="dropdownMenu4">
                    <li><a href="javascript:void(0)" onclick="loginOut()">注销</a></li>
                </ul>
            </div>
        </div>
        <h1 class="logo">
            <strong>
                <a href="/" title="运营导航">
                    <img src="{{URL::asset('imgs/logo.png')}}" alt="运营导航">
                </a>
            </strong>
        </h1>
        <div class="primary-menus">
            <ul class="selects">
                <li> 常用</li>
                <li class="current" data-target="baidu-search"><span>百度</span></li>
                <li data-target="sogou-search"><span>搜狗微信</span></li>
                <li data-target="uiii-search"><span>站内搜索</span></li>
                <li data-target="book-search"><span>搜索文档</span></li>
            </ul>
            <div class="cont">
                <div class="left-cont">
                    <form class="search" id="baidu-search" action="https://www.baidu.com/s" method="get"
                          target="_blank">
                        <input type="text" name="wd" class="s" value="运营导航">
                        <button type="submit" name="submit" class="btn">百度一下</button>
                    </form>
                    <form class="search hidden" id="sogou-search" action="https://weixin.sogou.com/weixin" method="get"
                          target="_blank">
                        <input type="text" name="query" class="s" value="运营导航">
                        <button type="submit" name="submit" class="btn">搜狗微信</button>
                    </form>

                    <form class="search hidden " id="uiii-search" action="/search" method="post">
                        <input type="text" name="t_con" class="s" value="" placeholder="请输入,可按id/标题/简介搜索">
                        <input type="hidden" name="_token" value="{{csrf_token()}}">
                        <button type="submit" class="btn">站内搜索</button>
                    </form>

                    <form class="search hidden" id="book-search" action="/handbookSearch" method="get">
                        <input type="text" name="t_con" class="s" value="" placeholder="请输入文档id/标题">
                        <input type="hidden" id="user_name" name="username" value="">
                        <button type="submit" class="btn">搜索文档</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="header-recommend">
    <div class="container">
    </div>
</div>

<script>
    $(function () {
        var user = JSON.parse(sessionStorage.getItem("users"));
        if(user.username){
            $("#user_name").val(user.username);
            $(".book-search").show();
        }else{
            $(".book-search").hide();
        }
    });


</script>